﻿@model IEnumerable<Store.Web.Models.Order>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Liste des commandes</h2>

<table>
    <tr>
        <th>
            Client
        </th>
        <th>
            Prix total
        </th>
        <th>
            Etat
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Customer)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TotalPrice)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.State)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id })
        </td>
    </tr>
}

</table>